package cn.endeavour.pet.service;

import cn.endeavour.basic.service.IBaseService;
import cn.endeavour.basic.util.PageList;
import cn.endeavour.pet.domain.Pet;
import cn.endeavour.pet.domain.SearchMasterMsg;
import cn.endeavour.pet.query.SearchMasterMsgQuery;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * 发布寻主信息业务层
 */
public interface ISearchMasterMsgService extends IBaseService<SearchMasterMsg> {

    /**
     * 查询所有
     * @return
     */
    List<SearchMasterMsg> getAll();

    /**
     * 发布寻主消息
     * @param searchMasterMsg 寻主消息内容
     * @param request 请求对象
     */
    void publish(SearchMasterMsg searchMasterMsg, HttpServletRequest request);

    /**
     * 通过登录信息查询已经处理的信息
     * @param query
     * @param request
     * @return
     */
    PageList<SearchMasterMsg> processed(SearchMasterMsgQuery query, HttpServletRequest request);

    /**
     * 查询待处理的信息
     * @param query
     * @param request
     * @return
     */
    PageList<SearchMasterMsg> pending(SearchMasterMsgQuery query, HttpServletRequest request);

    /**
     * 用户查询信息
     * @param query
     * @param request
     * @return
     */
    PageList<SearchMasterMsg> user(SearchMasterMsgQuery query, HttpServletRequest request);

    /**
     * 处理宠物消息,然后在添加宠物
     * @param pet 宠物信息
     * @param request
     */
    void handle(Pet pet, HttpServletRequest request);
}
